import axios from '../axios'

export const findPage = (data) => {
  return axios({
    url: '/api/sys/role/page',
    method: 'post',
    data
  })
}
export const findRoleMenu = (data) => {
  return axios({
    url: '/api/sys/role/menus?roleId='+data.roleId,
    method: 'get'
  })
}
export const saveRoleMenus = (data) => {
  return axios({
    url: '/api/sys/role/roleMenusSet',
    method: 'post',
    data
  })
}
export const saveRole = (data) => {
  return axios({
    url: '/api/sys/role/add',
    method: 'post',
    data
  })
}
export const delRole = (data) => {
  return axios({
    url: '/api/sys/role/del',
    method: 'post',
    data
  })
}
